package day04_factory_method.product;

/**
 * @author Koizumi Sinya
 * @date 2018/11/07. 20:35
 * @edithor
 * @date
 */
public abstract class Factory {
    public final Product create(String name) {
        Product product = createProduct(name);
        registerProduct(product);
        return product;
    }

    protected abstract Product createProduct(String name);

    protected abstract void registerProduct(Product product);
}
